package com.weimob.mcloud.wechatwork.customer.service.user.enums;


/**
 * 节点类型
 *
 * @author shaowen.li
 */
public enum VidTypeEnum {

    /**
     * 节点类型
     * 1:集团 2：品牌 3：区域 5：商场 6：楼层  10：门店	 100：自提点/站点
     */
    VID_ROOT(0, "全局根节点"),
    VID_COMPANY(1, "集团"),
    VID_BRAND(2, "品牌"),
    VID_AREA(3, "区域"),
    VID_MARKEY(5, "商场"),
    VID_FLOOR(6, "楼层"),
    VID_SHOP(10, "门店"),
    VID_SITE(100, "自提点/站点"),
    ;

    private Integer code;

    private String desc;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    VidTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static VidTypeEnum of(Integer code) {
        for (VidTypeEnum enumEntity : values()) {
            if (enumEntity.code.equals(code)) {
                return enumEntity;
            }
        }
        return null;
    }
}
